<template>
  <div class="regist-result">
    <Row
      type="flex"
      justify="center"
      align="middle"
      @keydown.enter="submitRegist"
      style="height: 90%"
    >
      <Col class="layout">
        <div>
          <Header
            style="
              height: 25%;
              display: flex;
              align-items: center;
              justify-content: center;
            "
          />
          <Row class="success">
            <Icon type="md-checkmark-circle" color="#52c41a" size="64"></Icon>
            <p class="success-words">
              恭喜您，您的承运人账号：{{ username }} 注册成功
            </p>
            <Row class="buttons">
              <!-- <router-link to="/login"> -->
              <Button
                @click="loginBut"
                type="primary"
                size="large"
                style="margin-right: 10px"
                >立即登录</Button
              >
              <!-- </router-link> -->
              <!-- <router-link to="/regist"> -->
              <Button @click="registBut" size="large">返回注册</Button>
              <!-- </router-link> -->
            </Row>
          </Row>
        </div>
      </Col>
      <LangSwitch />
    </Row>
    <Footer />
  </div>
</template>

<script>
import Cookies from "js-cookie";
import Header from "@/views/main-components/header";
import Footer from "@/views/main-components/footer";
import LangSwitch from "@/views/main-components/lang-switch";
export default {
  components: {
    Header,
    Footer,
    LangSwitch,
  },
  data() {
    return {
      username: "",
    };
  },
  methods: {
    loginBut() {
      this.$router.push({
        name: "login",
      });
    },
    registBut() {
      this.$router.push({
        name: "regist",
      });
    },
  },
  mounted() {
    this.username = this.$route.query.username;
  },
};
</script>

<style lang="less">
@import "./regist-result.less";
</style>
